local pch_uni = pch_uni or {}

-- pch_cte.appInfo = {
--  appId = "300008713232",
--  appKey = "6C20462E58C13D91BF463E98317A4F9D"
-- }

pch_uni.itemInfo = {
    ChangWanLiBao = { paycode = "9020702937020141111120538478300001"},
    TiLiBuMan =     { paycode = "9020702937020141111120538478300002"},
    FuHuo =         { paycode = "9020702937020141111120538478300003"},
    JinBi_680 =     { paycode = "004"},
    JinBi_1680 =    { paycode = "9020702937020141111120538478300005"},
    JinBi_3980 =    { paycode = "9020702937020141111120538478300006"},
    FenJi_10 =      { paycode = "9020702937020141111120538478300007"},
    YuHeng_10 =     { paycode = "9020702937020141111120538478300008"},
}

local luaj = require "luaj"

function pch_uni:init_callJava()
-- local args = {}
-- local sigs = "()V"
-- local className = "org/cocos2dx/lua/AppActivity"
-- local ok = luaj.callStaticMethod(className, "s_cteInit_fromLua", args, sigs)
-- if not ok then
--  d_print("pch_uni init_callJava error")
-- end
end

function pch_uni:order_callJava( item )
    -- body
    local bOk = false
    if self.itemInfo[item.key] then

        local paycode = self.itemInfo[item.key].paycode

        local args = {paycode}
        local sigs = "(Ljava/lang/String;)V"
        local className = "org/cocos2dx/lua/AppActivity"
        bOk = luaj.callStaticMethod(className, "s_uniOrder_fromLua", args, sigs)
        d_print("pch_uni order_callJava:"..bOk)
    else
        assert(false, "cte order item unexist:"..item.key)
    end

    return bOk
end


return pch_uni
